#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int n, x, count = 0;
    scanf("%d", &n);
    int a[1001];
    for (int i = 0; i < n; i++) {
        scanf("%d", &a[i]);
    }
    scanf("%d", &x);
    for (int i = 0; i < n; i++) {
        if (a[i] == x) {
            count++;
        }
    }
    printf("%d\n", count);
    return 0;
}